score = input("请输入成绩(0-100):")
if score.isdigit():
    score = int(score)
    if score > 100:
        print("输入有误,大于100")
        exit()
    elif score < 0:
        print("输入有误,小于0")
        exit()
    else:
        if 85 <= score <= 100 :
            grade = "优秀"
        elif 60 <= score < 85 :
            grade = "良好"
        else:
            grade = "不及格"
    print(f"成绩为:{score},等级为:{grade}")
else:
    print("输入有误!")